import request from "../http/http"
const isLoggedIn = localStorage.getItem('token');

//新增司机记录
export const addSiji = (category) => {
    console.log(category,'调用了添加接口')
    return request.post('/admin/adddriverCheck', category,{
        headers:{
            Token:isLoggedIn
        }
    });
};

//查询司机记录列表
export const getSiji = (count) => {
    return request.get('/admin/getdriverChecks', {
        params:{
            page:count,
            size:20
        },
        headers:{
            Token:isLoggedIn
        }
    });
};

//删除司机记录
export const deleteSiji = (id) => {
    return request.delete(`/admin/deletedriverCheck/${id}`,{
        headers:{
            Token:isLoggedIn
        }
    });s
};

// 修改司机记录
export const putSiji = (data) => {
    console.log(data,'调用了修改接口')
    return request.put('/admin/updatedriverCheck', data,{
        headers:{
            Token:isLoggedIn
        }
    });
};